Release 10.1A: OpenEdge Development:
Progress Dynamics Basic Development


Progress Dynamics message dialog box

The standard message dialog box used throughout Progress Dynamics is shown in Figure 10–8.

Figure 10–8: Standard Message dialog box—Message Summary tab

The first tab displays the Message Summary, or short form of the message. It shows the message text, in the appropriate language for the user, the error Message Group and Message Number (AF:114), and the message type (INFfor informational, as indicated by the i symbol at the upper left). You can see that the default title is Error, and the default button is OK.

Figure 10–9 shows the second tab, Message Detail, the longer form of the message that can be entered into the message definition in the message table in the Repository database. You can expand the dialog box to full-page size by choosing the window icon at the lower left.

Figure 10–9: Standard Message dialog box—Message Detail tab

The third tab shows a host of system information about the user, the platform on which the application is running, what procedures are running, etc. Figure 10–10 shows just a sample of this information.

Figure 10–10: Standard Message dialog box—System Information tab

The fourth tab shows information about the AppServer connection if the application is running with an AppServer. If there is no AppServer connection, then this tab will be blank.

The magnifying glass icon brings up a Progress stack trace. The letter icon sends a message to a technical support organization or other responsible administrator if this is enabled.

This next code example shows a few of the formatting options when the message is being displayed (&display-error = YES). The &message-type has been set to WAR to signal a warning; the set of &message-buttons has been set to OK and CANCEL; and the &message-title is set to 'Sample Message'. Note the use of nested quotation marks in specifying the value Sample Message. This is a standard requirement of the Progress 4GL include file mechanism when an argument has nested white space, as shown:

{afglobals.i} 
{launch.i &PLIP = 'af/app/gscddxmlp.p' 
         &IProc = 'validateDatasetQuery' 
         &OnApp = 'NO' 
         &PList = "('rycso','rycsf','smartobject_obj,smartoxxxxt_obj','',no)"  
         &AutoKill = YES} 
{checkerr.i &display-error = YES 
           &message-type = 'WAR' 
           &message-buttons = 'OK,CANCEL' 
           &message-title = "'Sample Message'" 
           }. 

When you run the procedure again with the same error condition, the message dialog box is changed, as shown in Figure 10–11.

Figure 10–11: Sample Message dialog box—Message Summary tab

A server-side business logic procedure would not display the error directly or manipulate its format. It might, however, want to intercept the error in some other way using one of the RETURN-related include file arguments. For example, if you change the include file reference to specify &no-return, then the code block simply continues on following the error. In this case, the code can use one of the local variables defined as part of the error-checking mechanism.

The next example specifies &no-return, and then displays the message text stored in the variable cMessageList:

{af/sup2/afglobals.i} 
{launch.i &PLIP = 'af/app/gscddxmlp.p' 
         &IProc = 'validateDatasetQuery' 
         &OnApp = 'NO' 
         &PList = "('rycso','rycsf','smartobject_obj,smartoxxxxt_obj','',no)"  
         &AutoKill = YES} 
{af/sup2/checkerr.i &no-return = YES }. 
MESSAGE cMessageList. 

The message display reflects the complex format of the various components of the message as explained previously.

Figure 10–12 shows the unadulterated message text that results. In very special cases, your logic might want to take this text apart to determine the nature of the error. In most cases, however, the text is simply returned to the standard display mechanism, which deals with the message format for you.

Figure 10–12: Unformatted message display


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095